package com.whzjkj.gateway.server.processor.command;

import com.whzjkj.gateway.constant.JT808Constant;
import com.whzjkj.gateway.server.processor.AbstractMessageProcessor;
import com.whzjkj.gateway.vo.PackageData;
import org.springframework.stereotype.Component;

/**
 * @description: 终端心跳包处理
 * @author: Mr.Hu
 * @create: 2018-11-01 08:47
 **/
@Component
public class CMD0001 extends AbstractMessageProcessor {

    @Override
    public void processTerminalMessage(PackageData data) throws InterruptedException {
        super.sendMessage(data.getChannel(), new byte[]{12,23,23});
    }

    @Override
    public boolean support(PackageData data) {
        return data.getMessageHeader().getMessageId()== JT808Constant.CMD_COMMON_TERMINAL_RESPOND;
    }
}
